package com.elh.nio.test;

import java.io.IOException;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * @author liulei
 **/
public class Server1 {

    public static void main(String[] args) throws IOException {
        ServerSocket serverSocket = new ServerSocket(8088);
        System.out.println("start ===>");
        Socket socket = serverSocket.accept();
        System.out.println("end ===>");
        OutputStream outputStream = socket.getOutputStream();
        outputStream.write("我是高红".getBytes());
        outputStream.close();
        serverSocket.close();
    }

}
